<?php
//~ Template for list.php
// variables:
//  $title - page title
//  $status - status of TODOs to be displayed
//  $todos - TODOs to be displayed

?>

<h1>
    <img src="img/status/<?php echo $status; ?>.png" alt="" title="<?php echo Utils::capitalize($status); ?>" class="icon" />
    <?php echo $title; ?>
</h1>

<?php if (empty($bancuri)): ?>
    <p>Nu a fost gasit nici un banc din categoria <?php echo $currentCategory->getName(); ?>.</p>
<?php else: ?>
    <ul class="list">
        <?php foreach ($bancuri as $content): ?>
            <?php /* @var $todo Todo */ ?>
            <li>
                <div style="float: left;"><span class="label"><?php echo $content->getTitle(); ?></span></div>
                <div style="float: right;">
                    <span class="label">Punctaj:</span>
                    <span id="p_<?php echo $content->getId(); ?>"><?php echo $content->getGrade(); ?></span> / 
                    <span class="label">Voturi:</span>
                    <span id="n_<?php echo $content->getId(); ?>"><?php echo $content->getGradesNumber(); ?></span>
                </div>
                <div class="contentText"><?php echo $content->getText(); ?></div>
                <div id="vot_<?php echo $content->getId(); ?>"style="float: right;">
                    <span class="label">Votează:</span>
                    <div class="vot" align="center" onclick="">1</div>
                    <div class="vot" align="center">2</div>
                    <div class="vot" align="center">3</div>
                    <div class="vot" align="center">4</div>
                    <div class="vot" align="center">5</div>
                </div>
            </li>
        <?php endforeach; ?>
    </ul>
<?php endif; ?>
